package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 帖子基本信息表(Post)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-15 16:25:31
 */
@ApiModel("帖子基本信息表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Post implements Serializable {
    private static final long serialVersionUID = -88855551988842806L;
        /**
    *主键
    * 帖子id
    * isnull 1
    */
    @ApiModelProperty(value="帖子id",position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String postId;

    /**
    * 作者id
    * isnull 0
    */        @ApiModelProperty(value="作者id",position=2)
    private String authorId;
    /**
    * 作者昵称
    * isnull 0
    */        @ApiModelProperty(value="作者昵称",position=3)
    private String authorName;
    /**
    * 帖子标题
    * isnull 0
    */        @ApiModelProperty(value="帖子标题",position=4)
    private String postName;
    /**
    * 帖子内容
    * isnull 0
    */        @ApiModelProperty(value="帖子内容",position=5)
    private String postContent;
    /**
    * 帖子图片集（数组）
    * isnull 0
    */        @ApiModelProperty(value="帖子图片集（数组）",position=6)
    private String postPic;
    /**
    * 帖子外链
    * isnull 0
    */        @ApiModelProperty(value="帖子外链",position=7)
    private String postLink;
    /**
    * 帖子二级标签
    * isnull 0
    */        @ApiModelProperty(value="帖子二级标签", position=8)
    private String postTwolabel;
    /**
    * 帖子一级标签
    * isnull 0
    */        @ApiModelProperty(value="帖子一级标签",position=9)
    private String postOnelabel;
    /**
    * 点赞数量
    * isnull 0
    */        @ApiModelProperty(value="点赞数量",position=10)
    private Integer likeCount;
    /**
    * 收藏数量
    * isnull 0
    */        @ApiModelProperty(value="收藏数量",position=11)
    private Integer favoriteCount;
    /**
    * 评论数量
    * isnull 0
    */        @ApiModelProperty(value="评论数量",position=12)
    private Integer commentCount;
    /**
    * 创建时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="创建时间",position=13)
    private LocalDateTime creatTime;
    /**
    * 发布状态（0:立即发布，1:保存到草稿箱）
    * isnull 0
    */        @ApiModelProperty(value="发布状态（0:立即发布，1:保存到草稿箱）",position=14)
    private Integer putStatus;
    /**
    * 更新时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        @ApiModelProperty(value="更新时间",position=15)
    private LocalDateTime updateTime;
        
    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }
        
    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }
        
    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }
        
    public String getPostName() {
        return postName;
    }

    public void setPostName(String postName) {
        this.postName = postName;
    }
        
    public String getPostContent() {
        return postContent;
    }

    public void setPostContent(String postContent) {
        this.postContent = postContent;
    }
        
    public String getPostPic() {
        return postPic;
    }

    public void setPostPic(String postPic) {
        this.postPic = postPic;
    }
        
    public String getPostLink() {
        return postLink;
    }

    public void setPostLink(String postLink) {
        this.postLink = postLink;
    }
        
    public String getPostTwolabel() {
        return postTwolabel;
    }

    public void setPostTwolabel(String postTwolabel) {
        this.postTwolabel = postTwolabel;
    }
        
    public String getPostOnelabel() {
        return postOnelabel;
    }

    public void setPostOnelabel(String postOnelabel) {
        this.postOnelabel = postOnelabel;
    }
        
    public Integer getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(Integer likeCount) {
        this.likeCount = likeCount;
    }
        
    public Integer getFavoriteCount() {
        return favoriteCount;
    }

    public void setFavoriteCount(Integer favoriteCount) {
        this.favoriteCount = favoriteCount;
    }
        
    public Integer getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(Integer commentCount) {
        this.commentCount = commentCount;
    }
        
    public LocalDateTime getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(LocalDateTime creatTime) {
        this.creatTime = creatTime;
    }
        
    public Integer getPutStatus() {
        return putStatus;
    }

    public void setPutStatus(Integer putStatus) {
        this.putStatus = putStatus;
    }
        
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"postId\":" + postId +
                                  " ,\"authorId\":" + authorId +
                            " ,\"authorName\":" + authorName +
                            " ,\"postName\":" + postName +
                            " ,\"postContent\":" + postContent +
                            " ,\"postPic\":" + postPic +
                            " ,\"postLink\":" + postLink +
                            " ,\"postTwolabel\":" + postTwolabel +
                            " ,\"postOnelabel\":" + postOnelabel +
                            " ,\"likeCount\":" + likeCount +
                            " ,\"favoriteCount\":" + favoriteCount +
                            " ,\"commentCount\":" + commentCount +
                            " ,\"creatTime\":" + creatTime +
                            " ,\"putStatus\":" + putStatus +
                            " ,\"updateTime\":" + updateTime +
                  '}';
    }


}
